<template>
	<view class="search-page">
		<view class="header">
			<input type="text" placeholder="请输入订单号" v-model="searchInput" />
			<text @click="search">搜索</text>
		</view>
		<!-- <view class="tab-bar">
			<view class="tab-item" :class="{ 'active-tab': tab === '订单号' }" @click="changeTab('订单号')">订单号</view>
			<view class="tab-item" :class="{ 'active-tab': tab === '流水号' }" @click="changeTab('流水号')">流水号</view>
			<view class="tab-item" :class="{ 'active-tab': tab === '配送单号' }" @click="changeTab('配送单号')">配送单号</view>
			<view class="tab-item" :class="{ 'active-tab': tab === '收货地址' }" @click="changeTab('收货地址')">收货地址</view>
		</view> -->
		<view class="empty-content" v-if="isEmpty">
			<image :src="$imgUrl + '/static/sousuodingdan.png'" mode="widthFix"></image>
			<text>输入订单号以查询数据</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchInput: '',
				// tab: '订单号',
				isEmpty: true
			};
		},
		methods: {
			changeTab(tab) {
				this.tab = tab;
			},
			search(){
				uni.$emit('searchInputValue', this.searchInput);
				uni.navigateBack(1)
			}
		}
	};
</script>

<style>
	.search-page {
		background-color: #f5f5f5;
		height: 100vh;
		display: flex;
		flex-direction: column;
	}

	.header {
		background-color: #fff;
		width: 95%;
		height: 80rpx;
		display: flex;
		align-items: center;
		padding: 0 20rpx;
		margin: 0 auto;
		border-bottom: 1rpx solid #eee;
		/* border-radius: 30rpx; */
	}

	input {
		flex: 1;
		height: 60rpx;
		margin-right: 20rpx;
		padding: 0 10rpx;
		border: none;
		font-size: 28rpx;
	}

	text {
		font-size: 28rpx;
		color: #3660ba;
	}

/* 	.tab-bar {
		background-color: #fff;
		display: flex;
		margin-top: 20rpx;
	}

	.tab-item {
		flex: 1;
		height: 60rpx;
		line-height: 60rpx;
		text-align: center;
		font-size: 28rpx;
		border-right: 1rpx solid #eee;
	}

	.tab-item:last-child {
		border-right: none;
	}

	.active-tab {
		background-color: #3399ff;
		color: #fff;
	} */

	.empty-content {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.empty-content image {
		width: 200rpx;
		height: 200rpx;
		margin-bottom: 20rpx;
	}

	.empty-content text {
		font-size: 24rpx;
		color: #999;
	}
</style>